home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Visual Basic 5.0 (2nd Edition) / Hardcore Visual Basic 5.0 - Second Edition (1997)(Microsoft Press).iso / Source / WinTlb / winver.idl < prev    next >
Text File  |  1997-02-03  |  9KB  |  252 lines

  1. // 
  2. // 
  3. // winver.h -    Version management functions, types, and definitions          *
  4. //                                                                              *
  5. //               Include file for VER.DLL.  This library is                    *
  6. //               designed to allow version stamping of Windows executable files*
  7. //               and of special .VER files for DOS executable files.           *
  8. //                                                                              *
  9. //               Copyright (c) 1993-1995, Microsoft Corp.  All rights reserved *
  10. //                                                                             *
  11.  
  12. #ifndef VER_H
  13. #define VER_H
  14.  
  15. // ----- Types and structures ----- 
  16.  
  17. typedef struct VS_FIXEDFILEINFO {
  18.     DWORD   dwSignature;            // e.g. = 0xfeef04bd 
  19.     DWORD   dwStrucVersion;         // e.g. = 0x00000042 = "0.42" 
  20.     DWORD   dwFileVersionMS;        // e.g. = 0x00030075 = "3.75" 
  21.     DWORD   dwFileVersionLS;        // e.g. = 0x00000031 = "0.31" 
  22.     DWORD   dwProductVersionMS;     // e.g. = 0x00030010 = "3.10" 
  23.     DWORD   dwProductVersionLS;     // e.g. = 0x00000031 = "0.31" 
  24.     DWORD   dwFileFlagsMask;        // = = 0x3F for version "0.42" 
  25.     DWORD   dwFileFlags;            // e.g. VFF_DEBUG | VFF_PRERELEASE 
  26.     DWORD   dwFileOS;               // e.g. VOS_DOS_WINDOWS16 
  27.     DWORD   dwFileType;             // e.g. VFT_DRIVER 
  28.     DWORD   dwFileSubtype;          // e.g. VFT2_DRV_KEYBOARD 
  29.     DWORD   dwFileDateMS;           // e.g. 0 
  30.     DWORD   dwFileDateLS;           // e.g. 0 
  31. } VS_FIXEDFILEINFO;
  32.  
  33. [
  34. #ifdef UNICODE
  35. uuid(64675068-3A82-101B-8181-00AA003743D3),
  36. #else
  37. uuid(64674068-3A82-101B-8181-00AA003743D3),
  38. #endif
  39. helpstring("Version Data"),
  40. dllname("VERSION.DLL")
  41. ]
  42. module WinVersion {
  43.  
  44.     // ----- Symbols ----- 
  45.     const DWORD VS_FILE_INFO            = 16; // RT_VERSION
  46.     const DWORD VS_VERSION_INFO         = 1;
  47.     const DWORD VS_USER_DEFINED         = 100;
  48.  
  49.     // ----- VS_VERSION.dwFileFlags ----- 
  50.     const DWORD VS_FFI_SIGNATURE        = 0xFEEF04BD;
  51.     const DWORD VS_FFI_STRUCVERSION     = 0x00010000;
  52.     const DWORD VS_FFI_FILEFLAGSMASK    = 0x0000003F;
  53.  
  54.     // ----- VS_VERSION.dwFileFlags ----- 
  55.     const DWORD VS_FF_DEBUG             = 0x00000001;
  56.     const DWORD VS_FF_PRERELEASE        = 0x00000002;
  57.     const DWORD VS_FF_PATCHED           = 0x00000004;
  58.     const DWORD VS_FF_PRIVATEBUILD      = 0x00000008;
  59.     const DWORD VS_FF_INFOINFERRED      = 0x00000010;
  60.     const DWORD VS_FF_SPECIALBUILD      = 0x00000020;
  61.  
  62.     // ----- VS_VERSION.dwFileOS ----- 
  63.     const DWORD VOS_UNKNOWN             = 0x00000000;
  64.     const DWORD VOS_DOS                 = 0x00010000;
  65.     const DWORD VOS_OS216               = 0x00020000;
  66.     const DWORD VOS_OS232               = 0x00030000;
  67.     const DWORD VOS_NT                  = 0x00040000;
  68.  
  69.     const DWORD VOS__BASE               = 0x00000000;
  70.     const DWORD VOS__WINDOWS16          = 0x00000001;
  71.     const DWORD VOS__PM16               = 0x00000002;
  72.     const DWORD VOS__PM32               = 0x00000003;
  73.     const DWORD VOS__WINDOWS32          = 0x00000004;
  74.  
  75.     const DWORD VOS_DOS_WINDOWS16       = 0x00010001;
  76.     const DWORD VOS_DOS_WINDOWS32       = 0x00010004;
  77.     const DWORD VOS_OS216_PM16          = 0x00020002;
  78.     const DWORD VOS_OS232_PM32          = 0x00030003;
  79.     const DWORD VOS_NT_WINDOWS32        = 0x00040004;
  80.  
  81.     // ----- VS_VERSION.dwFileType ----- 
  82.     const DWORD VFT_UNKNOWN             = 0x00000000;
  83.     const DWORD VFT_APP                 = 0x00000001;
  84.     const DWORD VFT_DLL                 = 0x00000002;
  85.     const DWORD VFT_DRV                 = 0x00000003;
  86.     const DWORD VFT_FONT                = 0x00000004;
  87.     const DWORD VFT_VXD                 = 0x00000005;
  88.     const DWORD VFT_STATIC_LIB          = 0x00000007;
  89.  
  90.     // ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV ----- 
  91.     const DWORD VFT2_UNKNOWN            = 0x00000000;
  92.     const DWORD VFT2_DRV_PRINTER        = 0x00000001;
  93.     const DWORD VFT2_DRV_KEYBOARD       = 0x00000002;
  94.     const DWORD VFT2_DRV_LANGUAGE       = 0x00000003;
  95.     const DWORD VFT2_DRV_DISPLAY        = 0x00000004;
  96.     const DWORD VFT2_DRV_MOUSE          = 0x00000005;
  97.     const DWORD VFT2_DRV_NETWORK        = 0x00000006;
  98.     const DWORD VFT2_DRV_SYSTEM         = 0x00000007;
  99.     const DWORD VFT2_DRV_INSTALLABLE    = 0x00000008;
  100.     const DWORD VFT2_DRV_SOUND          = 0x00000009;
  101.     const DWORD VFT2_DRV_COMM           = 0x0000000A;
  102.     const DWORD VFT2_DRV_INPUTMETHOD    = 0x0000000B;
  103.  
  104.     // ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT ----- 
  105.     const DWORD VFT2_FONT_RASTER        = 0x00000001;
  106.     const DWORD VFT2_FONT_VECTOR        = 0x00000002;
  107.     const DWORD VFT2_FONT_TRUETYPE      = 0x00000003;
  108.  
  109.     // ----- VerFindFile() flags ----- 
  110.     const WORD VFFF_ISSHAREDFILE        = 0x0001;
  111.  
  112.     const WORD VFF_CURNEDEST            = 0x0001;
  113.     const WORD VFF_FILEINUSE            = 0x0002;
  114.     const WORD VFF_BUFFTOOSMALL         = 0x0004;
  115.  
  116.     // ----- VerInstallFile() flags ----- 
  117.     const WORD VIFF_FORCEINSTALL        = 0x0001;
  118.     const WORD VIFF_DONTDELETEOLD       = 0x0002;
  119.  
  120.     const DWORD VIF_TEMPFILE            = 0x00000001;
  121.     const DWORD VIF_MISMATCH            = 0x00000002;
  122.     const DWORD VIF_SRCOLD              = 0x00000004;
  123.  
  124.     const DWORD VIF_DIFFLANG            = 0x00000008;
  125.     const DWORD VIF_DIFFCODEPG          = 0x00000010;
  126.     const DWORD VIF_DIFFTYPE            = 0x00000020;
  127.  
  128.     const DWORD VIF_WRITEPROT           = 0x00000040;
  129.     const DWORD VIF_FILEINUSE           = 0x00000080;
  130.     const DWORD VIF_OUTOFSPACE          = 0x00000100;
  131.     const DWORD VIF_ACCESSVIOLATION     = 0x00000200;
  132.     const DWORD VIF_SHARINGVIOLATION    = 0x00000400;
  133.     const DWORD VIF_CANNOTCREATE        = 0x00000800;
  134.     const DWORD VIF_CANNOTDELETE        = 0x00001000;
  135.     const DWORD VIF_CANNOTRENAME        = 0x00002000;
  136.     const DWORD VIF_CANNOTDELETECUR     = 0x00004000;
  137.     const DWORD VIF_OUTOFMEMORY         = 0x00008000;
  138.  
  139.     const DWORD VIF_CANNOTREADSRC       = 0x00010000;
  140.     const DWORD VIF_CANNOTREADDST       = 0x00020000;
  141.  
  142.     const DWORD VIF_BUFFTOOSMALL        = 0x00040000;
  143.  
  144.     // ----- Function prototypes ----- 
  145.  
  146.     [
  147.     usesgetlasterror,
  148.     #ifdef UNICODE
  149.     entry("VerFindFileW"),
  150.     #else
  151.     entry("VerFindFileA"),
  152.     #endif
  153.     helpstring("Determines where to install a file based on whether there is another version of the file in the system"),
  154.     ]
  155.     DWORD WINAPI VerFindFile(
  156.             DWORD uFlags,
  157.             LPTSTR szFileName,
  158.             LPTSTR szWinDir,
  159.             LPTSTR szAppDir,
  160.             LPTSTR szCurDir,
  161.             UINT * lpuCurDirLen,
  162.             LPTSTR szDestDir,
  163.             UINT * lpuDestDirLen
  164.             );
  165.  
  166.     [
  167.     usesgetlasterror,
  168.     #ifdef UNICODE
  169.     entry("VerInstallFileW"),
  170.     #else
  171.     entry("VerInstallFileA"),
  172.     #endif
  173.     helpstring("Attempts to install the specified file based on information returned from the VerFindFile function"),
  174.     ]
  175.     DWORD WINAPI VerInstallFile(
  176.             DWORD uFlags,
  177.             LPTSTR szSrcFileName,
  178.             LPTSTR szDestFileName,
  179.             LPTSTR szSrcDir,
  180.             LPTSTR szDestDir,
  181.             LPTSTR szCurDir,
  182.             LPTSTR szTmpFile,
  183.             UINT * lpuTmpFileLen
  184.             );
  185.  
  186.     // Returns size of version info in bytes 
  187.     [
  188.     usesgetlasterror,
  189.     #ifdef UNICODE
  190.     entry("GetFileVersionInfoSizeW"),
  191.     #else
  192.     entry("GetFileVersionInfoSizeA"),
  193.     #endif
  194.     helpstring("Determines whether the operating system can obtain version information about a specified file, and if so returns the size in bytes"),
  195.     ]
  196.     DWORD WINAPI GetFileVersionInfoSize(
  197.             LPTSTR lptstrFilename, 
  198.             DWORD * lpdwHandle
  199.             );       
  200.  
  201.     // Read version info into buffer 
  202.     [
  203.     usesgetlasterror,
  204.     #ifdef UNICODE
  205.     entry("GetFileVersionInfoW"),
  206.     #else
  207.     entry("GetFileVersionInfoA"),
  208.     #endif
  209.     helpstring("Returns version information about a specified file"),
  210.     ]
  211.     BOOL WINAPI GetFileVersionInfo(
  212.             LPTSTR lptstrFilename,  
  213.             DWORD dwHandle,         
  214.             DWORD dwLen,            
  215.             LPTSTR lpData
  216.             );            
  217.  
  218.     [
  219.     usesgetlasterror,
  220.     #ifdef UNICODE
  221.     entry("VerLanguageNameW"),
  222.     #else
  223.     entry("VerLanguageNameA"),
  224.     #endif
  225.     helpstring("Retrieves a description string for the language associated with a specified binary Microsoft language identifier"),
  226.     ]
  227.     DWORD WINAPI VerLanguageName(
  228.             DWORD wLang,
  229.             LPTSTR szLang,
  230.             DWORD nSize
  231.             );
  232.  
  233.     [
  234.     usesgetlasterror,
  235.     #ifdef UNICODE
  236.     entry("VerQueryValueW"),
  237.     #else
  238.     entry("VerQueryValueA"),
  239.     #endif
  240.     helpstring("Returns selected version information from the specified version-information resource"),
  241.     ]
  242.     BOOL WINAPI VerQueryValue(
  243.             LPTSTR pBlock,
  244.             LPTSTR lpSubBlock,
  245.             LONG * lplpBuffer,
  246.             UINT * puLen
  247.             );
  248.  
  249. }
  250.  
  251. #endif  // !VER_H 
  252.